package com.travel.server.manager.dao;

import com.travel.server.manager.model.OrderInfo;
import com.travel.server.manager.model.OrderInfoExample;
import com.travel.server.manager.model.dto.CustomerOrderDto;
import com.travel.server.manager.model.dto.OrderExcelDto;
import com.travel.server.manager.model.dto.OrderItemDto;
import com.travel.server.manager.model.dto.OrderRefundItemDto;
import com.travel.server.manager.model.dto.data.*;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface OrderInfoDao {
    int countByExample(OrderInfoExample example);

    int deleteByExample(OrderInfoExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(OrderInfo record);

    int insertSelective(OrderInfo record);

    List<OrderInfo> selectByExample(OrderInfoExample example);

    OrderInfo selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") OrderInfo record, @Param("example") OrderInfoExample example);

    int updateByExample(@Param("record") OrderInfo record, @Param("example") OrderInfoExample example);

    int updateByPrimaryKeySelective(OrderInfo record);

    int updateByPrimaryKey(OrderInfo record);

    List<OrderItemDto> selectByPage(OrderInfoExample example);

    List<OrderRefundItemDto> selectRefundByPage(OrderInfoExample example);

    int selectRefundPage(OrderInfoExample example);

    CustomerOrderDto selectCountByCustomerId(Integer customerId);

    List<OrderExcelDto> selectExcelData(OrderInfoExample example);

    int updateOrderComplete();

    int batchInsert(List<OrderInfo> list);

    List<ProjectApplyDto> selectProjectApply(@Param("startTime") Date startTime, @Param(("endTime")) Date endTime, @Param("offset") Integer offset, @Param("limit") Integer limit);

    List<SpecialOrderDto> selectSpecialOrder(@Param("startTime") Date startTime, @Param(("endTime")) Date endTime);

    List<DayApplyDto> selectDayApply(@Param("startTime") Date startTime, @Param(("endTime")) Date endTime);

    List<OrderDataDto> selectOrderData(@Param("startTime") Date startTime, @Param(("endTime")) Date endTime);

    List<AmountSectionDto> selectAmountSection(@Param("startTime") Date startTime, @Param(("endTime")) Date endTime);

    List<OrderAnalysisDto> selectAnalysis(@Param("startTime") Date startTime, @Param(("endTime")) Date endTime, @Param("offset") Integer offset, @Param("limit") Integer limit);

    List<OrderSaleTargetDto> selectSaleTarget(@Param("startTime") Date startTime, @Param(("endTime")) Date endTime, @Param("offset") Integer offset, @Param("limit") Integer limit);

    List<WholeAllDto> selectAllData(@Param("startTime") Date startTime, @Param(("endTime")) Date endTime);

    List<WholeDataDto> selectWholeData();

    List<WholeTrendDto> selectWholeTrend(@Param("startTime") Date startTime, @Param(("endTime")) Date endTime, @Param("time")Integer time);

    List<TradeDto> selectTradeList(@Param("startTime") Date startTime, @Param(("endTime")) Date endTime, @Param("offset") Integer offset, @Param("limit") Integer limit);

    Integer selectTradeCount(@Param("startTime") Date startTime, @Param(("endTime")) Date endTime);

    Integer selectSumPayAmount(@Param("startTime") Date startTime, @Param(("endTime")) Date endTime);

    Integer selectCountPayNum(@Param("startTime") Date startTime, @Param(("endTime")) Date endTime);
}